﻿@model List<PermissionViewModel>

@{
    ViewData["Title"] = "Manage User Roles";
    Title = "Manage User Roles.";
    Layout = Constants.AdminLayoutName;
    var index = 1;
}
<a href="/UserAuth/CreateEditRoles" class="btn btn-primary">Create New</a>
<table class="table table-striped">
    <tr>
        <th>SN:</th><th>Name</th><th>Group</th><th>Description</th><th>Contains</th><th>Users</th><th>Action</th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>@index</td>
            <td>@item.Name</td>
            <td>@item.Group</td>
            <td>@item.Description</td>
            <td>Module(@item.ModuleCount), Menu(@item.MenuCount)</td>
            <td>User(@item.UserCount)</td>
            <td><a href="/UserAuth/CreateEditRoles/?roleId=@item.Id">Edit </a> | <a href="/UserAuth/DeleteRoleConfirm/?roleId=@item.Id">Delete</a></td>
        </tr>

        index++;
    }
</table>